<table>
    <tr>
        <td colspan="3">
            <?php echo $this->element('excel/title'); ?>
        </td>
        <td colspan="3">
            <table>
                <tr>
                    <td colspan="3" class="docNote">VMI: VENDOR INVENTORY</td>
                </tr>
                <tr>
                    <td><label>Printed Date</label></td>
                    <td colspan="2"><?php echo date('d/m/Y H:i'); ?></td>
                </tr>
                <tr>
                    <td><label>Printed by</label></td>
                    <td colspan="2"><?php echo $report_by; ?></td>
                </tr>
                <tr>
                    <td width="90px"><label>Vendor no.</label></td>
                    <td colspan="2"><?php echo $supplier_no; ?></td>
                </tr>
                <tr>
                    <td><label>Vendor name</label></td>
                    <td colspan="2"><?php echo $supplier_name; ?></td>
                </tr>
                <?php if ($session->check('Criteria.brand')) {
                ?>
                    <tr>
                        <td><label>Brand</label></td>
                        <td colspan="2"><?php echo $session->read('Criteria.brand'); ?></td>
                    </tr>
                <?php } ?>
                <?php if ($session->check('Criteria.customer')) {
                ?>
                    <tr>
                        <td><label>Customer</label></td>
                        <td colspan="2"><?php echo $session->read('Criteria.customer'); ?></td>
                    </tr>
                <?php } ?>
                <?php if ($session->check('Criteria.site')) {
                ?>
                    <tr>
                        <td><label>Site</label></td>
                        <td colspan="2"><?php echo $session->read('Criteria.site'); ?></td>
                    </tr>
                <?php } ?>
                <?php if ($session->check('Criteria.category')) {
                ?>
                    <tr>
                        <td><label>Category</label></td>
                        <td colspan="2"><?php echo $session->read('Criteria.category'); ?></td>
                    </tr>
                <?php } ?>
                <?php if ($session->check('Criteria.supplier_part_no')) {
                ?>
                    <tr>
                        <td><label>Vendor Part no.</label></td>
                        <td colspan="2"><?php echo $session->read('Criteria.supplier_part_no'); ?></td>
                    </tr>
                <?php } ?>
                <?php if ($session->check('Criteria.title')) {
                ?>
                    <tr>
                        <td><label>Description</label></td>
                        <td colspan="2"><?php echo $session->read('Criteria.title'); ?></td>
                    </tr>
                <?php } ?>
            </table>
        </td>
    </tr>
</table>

<div class="main">
    <table id="dataTable" class="dataTable" cellspacing="0" cellpadding="0" >
        <thead id="tableHead">
            <tr>
                <th class="no">No</th>
                <th>Vendor Part no.</th>
                <th>Category</th>
                <th>Brand</th>
                <th>Model</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody id="tableBody">
            <?php
                foreach ($this->data as $i => $data) :
            ?>
                    <tr class="row">
                        <td class="center rowTd"><?php echo $i + 1; ?></td>
                        <td><?php echo $data['Product']['supplier_part_no']; ?></td>
                        <td><?php echo isset($data['Category']['name']) ? $data['Category']['name'] : '-'; ?></td>
                        <td><?php echo $data['Brand']['name']; ?></td>
                        <td><?php echo $data['Product']['model']; ?></td>
                        <td><?php echo $data['Product']['text']; ?></td>
                    </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
</div>

<div class="footer"></div>

<div id="divLastFooter">
</div>